package com.yjt.gcss.gddw.common.bean.domain;

import java.util.HashMap;
import java.util.Map;

import com.yjt.common.tools.TimeUtil;


/**
 * UiDkxy entity. @author xuept
 */
public class UiDkxy extends AbstractUiDkxy implements java.io.Serializable {
	/**
	 * 
	 */
	public static final String BEAN_PACKAGE_NAME = "com.yjt.gcss.gddw.common.bean.domain.UiDkxy";
	private static final long serialVersionUID = 1L;
	private String protNoType;
	private String protNoTypeDesc;
	private String tranTypeDesc;
	private String qdbzDesc;
	private String qyztDesc;
	//用于界面查询
	private String query_start_date_jyrq;
	private String query_end_date_jyrq;
	private String jyDateTimeDesc;
	private static final Map<String, String> statusMap;

	// Constructors

	/** default constructor */
	public UiDkxy() {
	}

	/** minimal constructor */
	public UiDkxy(String jybsh, String jylsh, String jyfqf, String dwbm,String wdmc,
			String orgId, String jyrq, String jysj, String qdbz,String userNo, String jfh,
			String jshmc, String yqyyhdm, String yqyzh, String yqyzhmc,
			String xqyyhdm, String xqyzh, String xqyzhmc, String lxdh,
			String status) {
		super(jybsh, jylsh, jyfqf, dwbm,wdmc, orgId, jyrq, jysj, qdbz,userNo, jfh, jshmc,
				yqyyhdm, yqyzh, yqyzhmc, xqyyhdm, xqyzh, xqyzhmc, lxdh, status);
	}

	/** full constructor */
	public UiDkxy(String jybsh, String ywbsh, String jylsh, String jyrbs,
			String jyfqf, String jyydz, String dwbm,String wdmc, String orgId, String jyrq,
			String jysj, String qdbz, String protNo, String userNo,String jfh, String jshmc,
			String jyjsf, String yqyyhdm, String yqyzh, String yqyzhmc,
			String xqyyhdm, String xqyzh, String xqyzhmc, String zhlx,
			String zjlx, String zjhm, String lxdh, String sjhm, String email,
			String bz, String qyzt,String yjylsh,String yjyrq,String yjysj,String status, String retCd, String retCdRemark) {
		super(jybsh, ywbsh, jylsh, jyrbs, jyfqf, jyydz, dwbm,wdmc, orgId, jyrq,
				jysj, qdbz, protNo, userNo,jfh, jshmc, jyjsf, yqyyhdm, yqyzh, yqyzhmc,
				xqyyhdm, xqyzh, xqyzhmc, zhlx, zjlx, zjhm, lxdh, sjhm, email,
				bz, qyzt, yjylsh, yjyrq, yjysj, status, retCd, retCdRemark);
	}

	public String getProtNoType() {
		return protNoType;
	}

	public void setProtNoType(String protNoType) {
		this.protNoType = protNoType;
	}

	public String getProtNoTypeDesc() {
		return protNoTypeDesc;
	}

	public void setProtNoTypeDesc(String protNoTypeDesc) {
		this.protNoTypeDesc = protNoTypeDesc;
	}

	public String getTranTypeDesc() {
		return tranTypeDesc;
	}

	public void setTranTypeDesc(String tranTypeDesc) {
		this.tranTypeDesc = tranTypeDesc;
	}
	
	public String getQdbzDesc() {
		/*
		 * 0 新增;1 修改;2 注销
		 * */
		if("0".equals(this.getQdbz())) {
			return "新增";
		} else if ("1".equals(this.getQdbz())) {
			return "修改";
		} else {
			return "注销";
		}
	}

	public String getQyztDesc() {
		/*
		 * 0未签;1 本行已签;2 本行已变更待确定;3 他行已签
		 * */
		if("0".equals(this.getQyzt())) {
			return "未签";
		}
		if("1".equals(this.getQyzt())) {
			return "本行已签";
		}
		if("2".equals(this.getQyzt())) {
			return "本行已变更待确定";
		}
		return "他行已签";
	}
	
	public String getQuery_start_date_jyrq() {
		return query_start_date_jyrq;
	}

	public void setQuery_start_date_jyrq(String query_start_date_jyrq) {
		this.query_start_date_jyrq = query_start_date_jyrq;
	}

	public String getQuery_end_date_jyrq() {
		return query_end_date_jyrq;
	}

	public void setQuery_end_date_jyrq(String query_end_date_jyrq) {
		this.query_end_date_jyrq = query_end_date_jyrq;
	}
	
	static {
		statusMap = new HashMap<String, String>();
		statusMap.put("W", "待发送");
		statusMap.put("A", "待回应");
		statusMap.put("S", "成功");
		statusMap.put("F", "失败");
		statusMap.put("E", "错误");
		statusMap.put("R", "已冲正");
	}
	
	public String getStatusDesc() {
		return statusMap.get(this.getStatus());
	}
	public String getJyDateTimeDesc() {
		if(TimeUtil.checkDate(this.getJyrq() + this.getJysj(), "yyyyMMddHHmmss")) {
			return TimeUtil.changeStrTimeFormat(this.getJyrq() + this.getJysj(), "yyyyMMddHHmmss", "yyyy-MM-dd HH:mm:ss");
		}
		return "";
	}
}
